<template>
  <f7-page>
    <f7-navbar title="添加顾客" back-link="Back"></f7-navbar>
    <f7-list inline-labels no-hairlines-md>
      <f7-list-input label="姓名" type="text" placeholder="Your name" :value="name" @input="name = $event.target.value" clear-button>
      </f7-list-input>
    </f7-list>
    <f7-list inline-labels no-hairlines-md>
      <f7-list-input label="性别" type="select" defaultValue="Male" placeholder="Please gender" :value="gender" @input="gender = $event.target.value" >
        <option value="男">男</option>
        <option value="女">女</option>
      </f7-list-input>
    </f7-list>
    <f7-list inline-labels no-hairlines-md>
      <f7-list-input label="身份证号" type="text" placeholder="Your Idcard" :value="idcard" @input="idcard = $event.target.value" clear-button>
      </f7-list-input>
    </f7-list>
    <f7-block strong class="queding">
      <f7-button fill raised  @click="queture">确定</f7-button>
    </f7-block>
  </f7-page>
</template>
<style scoped>
.search-list,
.search-list1,
.search-list2 {
  top: 10%;
}
.queding {
  top: 20%;
}
</style>
<script>
import axios from "axios";
import qs from "qs";
export default {
  data(){
    return{
      name:"",
      gender:"",
      idcard:"",
    }
  },
methods: {
    queture() {
      let apiCustomerAdd={
      }
      URL="/caofuying/checkIn/insertCustomer";
      axios.post(URL,qs.stringify( {
      name:this.name,
      gender:this.gender,
      idcard:this.idcard,
  })).then(r =>{

  })
      const self = this;
      const app = self.$f7;
      app.dialog.alert(`添加成功`, () => {
        this.$f7router.back("/informationinput/");
      });
    }
  }
}
</script>

